from app.utils.logger import logger
from app import config


class OtherService:
    async def handle(self, msg):
        raw_message = msg["raw_message"]
        if raw_message.upper() == "SHOU":
            return config.menu, 'text'
        elif raw_message == "修车师傅" or raw_message == "配钥匙":
            return config.bike_and_key, 'text'
        elif raw_message == "体测查询":
            return config.PE_test_check, 'text'
        elif raw_message == "体测标准":
            return "http://127.0.0.1:8080/static/pe_test_standard.jpg", 'image'
        elif raw_message == "医务室":
            return "http://127.0.0.1:8080/static/school_hospital.jpg", 'image'
        elif raw_message == "校历":
            return "http://127.0.0.1:8080/static/25-26academic_calendar.jpg", 'image'
        elif raw_message == "绩点标准":
            return "http://127.0.0.1:8080/static/score_table.png", 'image'
        elif raw_message == "缓考流程":
            return "http://127.0.0.1:8080/static/delay_test.png", 'image'
        else:
            logger.warning(f"Unknown message: {raw_message}")
